package com.neusoft.oa.controller.Email;

import com.neusoft.oa.pojo.Draft;
import com.neusoft.oa.service.IDraftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/draft")
@CrossOrigin
public class DraftController {

    @Autowired
    IDraftService draftService;

    @RequestMapping("list")
    public List<com.neusoft.oa.pojo.Draft> list(Draft draft)
    {
        return draftService.draftList(draft);
    }

    @RequestMapping("insert")
    public boolean insert(Draft draft){
        return draftService.draftInsert(draft);
    }

    @RequestMapping("update")
    public boolean update(Draft draft){
        return draftService.draftUpdate(draft);
    }
}


